import React from "react";
import ReactDOM from "react-dom/client";
import "./index.css";
import App from "./App";
import { CAN_CALL_LLM, IS_DEV } from "./lib/constants";

if (CAN_CALL_LLM) {
  const root = ReactDOM.createRoot(document.createDocumentFragment());

  root.render(
    <React.StrictMode>
      <App />
    </React.StrictMode>
  );
}

// mock dev data
if (IS_DEV) {
  window.call_llm_url = "http://192.168.0.108:8001/gj-rag/master/query";
  window.query_str = "王安石有哪些作品？";
  window.query_result = "无查询结果";
  window.person_list = ["王安石", "李白"];
}
